package com.xiangge.zuoye.Demo1;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/17 17:44
 * @description 这是一个描述书籍的类
 */
public class Book {
    private Integer id;
    private String title;
    private String author;
    private double price;
    private Integer salse;
    private Integer stork;
    private String imgPath = "static/img/default.jpg";

    public Book(Integer id, String title, String author, double price, Integer salse, Integer stork, String imgPath) {
        this.id = id;
        this.title = title;
        this.author = author;
        this.price = price;
        this.salse = salse;
        this.stork = stork;
        this.imgPath = imgPath;
    }

    public Book() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Integer getSalse() {
        return salse;
    }

    public void setSalse(Integer salse) {
        this.salse = salse;
    }

    public Integer getStork() {
        return stork;
    }

    public void setStork(Integer stork) {
        this.stork = stork;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }


    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", salse=" + salse +
                ", stork=" + stork +
                ", imgPath='" + imgPath + '\'' +
                '}';
    }
}
